package com.ruoyi.project.module.packetConfig.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.module.packetConfig.mapper.PacketConfigMapper;
import com.ruoyi.project.module.packetConfig.domain.PacketConfig;
import com.ruoyi.project.module.packetConfig.service.IPacketConfigService;
import com.ruoyi.common.support.Convert;

/**
 * 定时发红包配置 服务层实现
 * 
 * @author ruoyi
 * @date 2018-08-23
 */
@Service
public class PacketConfigServiceImpl implements IPacketConfigService 
{
	@Autowired
	private PacketConfigMapper packetConfigMapper;

	/**
     * 查询定时发红包配置信息
     * 
     * @param redPacketConfigId 定时发红包配置ID
     * @return 定时发红包配置信息
     */
    @Override
	public PacketConfig selectPacketConfigById(String redPacketConfigId)
	{
	    return packetConfigMapper.selectPacketConfigById(redPacketConfigId);
	}
	
	/**
     * 查询定时发红包配置列表
     * 
     * @param packetConfig 定时发红包配置信息
     * @return 定时发红包配置集合
     */
	@Override
	public List<PacketConfig> selectPacketConfigList(PacketConfig packetConfig)
	{
	    return packetConfigMapper.selectPacketConfigList(packetConfig);
	}
	
    /**
     * 新增定时发红包配置
     * 
     * @param packetConfig 定时发红包配置信息
     * @return 结果
     */
	@Override
	public int insertPacketConfig(PacketConfig packetConfig)
	{
	    return packetConfigMapper.insertPacketConfig(packetConfig);
	}
	
	/**
     * 修改定时发红包配置
     * 
     * @param packetConfig 定时发红包配置信息
     * @return 结果
     */
	@Override
	public int updatePacketConfig(PacketConfig packetConfig)
	{
	    return packetConfigMapper.updatePacketConfig(packetConfig);
	}

	/**
     * 删除定时发红包配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deletePacketConfigByIds(String ids)
	{
		return packetConfigMapper.deletePacketConfigByIds(Convert.toStrArray(ids));
	}
	
}
